package com.ruoyi.yyq.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.yyq.mapper.CarServiceDetailsMapper;
import com.ruoyi.yyq.domain.CarServiceDetails;
import com.ruoyi.yyq.service.ICarServiceDetailsService;

/**
 * 服务详情Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-10
 */
@Service
public class CarServiceDetailsServiceImpl implements ICarServiceDetailsService 
{
    @Autowired
    private CarServiceDetailsMapper carServiceDetailsMapper;

    /**
     * 查询服务详情
     * 
     * @param id 服务详情主键
     * @return 服务详情
     */
    @Override
    public CarServiceDetails selectCarServiceDetailsById(Long id)
    {
        return carServiceDetailsMapper.selectCarServiceDetailsById(id);
    }

    /**
     * 查询服务详情列表
     * 
     * @param carServiceDetails 服务详情
     * @return 服务详情
     */
    @Override
    public List<CarServiceDetails> selectCarServiceDetailsList(CarServiceDetails carServiceDetails)
    {
        return carServiceDetailsMapper.selectCarServiceDetailsList(carServiceDetails);
    }

    /**
     * 新增服务详情
     * 
     * @param carServiceDetails 服务详情
     * @return 结果
     */
    @Override
    public int insertCarServiceDetails(CarServiceDetails carServiceDetails)
    {
        return carServiceDetailsMapper.insertCarServiceDetails(carServiceDetails);
    }

    /**
     * 修改服务详情
     * 
     * @param carServiceDetails 服务详情
     * @return 结果
     */
    @Override
    public int updateCarServiceDetails(CarServiceDetails carServiceDetails)
    {
        return carServiceDetailsMapper.updateCarServiceDetails(carServiceDetails);
    }

    /**
     * 批量删除服务详情
     * 
     * @param ids 需要删除的服务详情主键
     * @return 结果
     */
    @Override
    public int deleteCarServiceDetailsByIds(Long[] ids)
    {
        return carServiceDetailsMapper.deleteCarServiceDetailsByIds(ids);
    }

    /**
     * 删除服务详情信息
     * 
     * @param id 服务详情主键
     * @return 结果
     */
    @Override
    public int deleteCarServiceDetailsById(Long id)
    {
        return carServiceDetailsMapper.deleteCarServiceDetailsById(id);
    }

    @Override
    public List<CarServiceDetails> selectByMerchantIdAndTypeId(Long merchantId, Long typeId) {
        return carServiceDetailsMapper.selectByMerchantIdAndTypeId(merchantId, typeId);
    }
}
